import axios from "axios";
import {
    message
} from "ant-design-vue";


const service = axios.create({
    // baseURL: '/api',
    // baseURL: 'http://183.223.222.117:51111/smart', //本地接口
    baseURL: 'https://3d.c-smart.hk/API/c-smart-static/zb', //正式地址
    timeout: 50000,
    withCredentials: true,
});
let date = new Date().getTime()
service.interceptors.request.use(
    config => {
        config.headers['Content-Type'] = "application/x-www-form-urlencoded";
        return config;
    }
);
// service.interceptors.response.use(
//   res => {
//     const { result, message, code } = res
//     if(code == 200){
//       return result
//     }
//   },
//   err => {
//     console.log(err);
//     message.error(err.message)
//   }
// );
export default service;